import requests

class IhrmModifyApi:

    # 接收传递过来的请求体
    @classmethod
    def modify(cls, id, param_head, param_body):
        # 准备请求数据的行头体
        print(id)
        req_url = f'http://ihrm-test.itheima.net/api/sys/user/{id}'
        print(req_url)
        req_head = param_head
        req_body = param_body

        # 填充好所需的参数，发送请求
        res = requests.put(url=req_url, headers=req_head, json=req_body)

        # 返回响应结果
        return res